package com.oracle.application.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author 李源浩
 * @Date 2021/7/1 13:41
 * @Version 1.0
 */
@Configuration
public class RandomLoadBanlance {


    @Bean("randomRule")//SpringCloud负载均衡Ribbon核心组件IRule
    public IRule randomLoadBanlance(){
        return new RandomRule();
    }

}
